Enivob
You may find some information in this video on constructing a solver from scratch.
Thanks, that video had great visuals but ultimately doesn't help me.
rgoldade
What is it that you're looking to do differently at the pressure projection step? I can try and answer your questions.
My project will further explore the possibilities of data-driven/machine-learned fluid simulations most recently explored in the
Accelerating Eulerian Fluid Simulation With Convolutional Networks [
cims.nyu.edu] paper. Basically the process involves 2 parts:
1. Training a Convolutional Neural Network with a whole lot of simulation data.
2. Using the trained CNN model to drive novel simulations. (By this I mean take the data from the simulation, run it through the CNN, use the output as the solved pressure field, thereby avoiding the expensive pressure solve for speed and less accuracy)
I can already do part 1, I write out the feature vectors using a python node and then train a CNN in TensorFlow. No problem.
I can't figure out part 2 yet, since I would need to replace the “Gas Project Non Divergent” node with my own implementation. That node both does the pressure solve and makes the velocity field divergence free. What I need is some way to replace the current matrix solve (you know, the A x = b thing) with a call to my own code that would run the data through the CNN to get the resulting pressure values. It would then do whatever I need to do to make the velocity divergence free, or maybe a 2nd node would. (I think I know this equation, but if you know the method in the HDK, that would be neat.)
I know I'll have to code up my own replacement node, I'm just running into problems.
OK, I've typed way too much, here is an actual, concrete question:The code my professor wrote in Houdini 12 makes use of the UT_SparseMatrixT< T, IsPaged >::solveConjugateGradient method:
http://www.sidefx.com/docs/hdk12.0/class_u_t___sparse_matrix_t.html#aac7909665ae1c4bf3d85764705ec35b [
sidefx.com]
In 15.5, I see this:
http://www.sidefx.com/docs/hdk15.5/class_u_t___sparse_matrix_t.html#a6f65cbf692907404ba4154b6617e5ca3 [
sidefx.com]
Basically, I have this code:
A.solveConjugateGradient( p, b );
, but the 15.5 version has 3 non-optional parameters. There is a new parameter called GT:
const UT_SparseMatrixT< T, IsPaged > * GT,
What is GT? There is no documentation for the method and everything I've learned about solving linear systems of equations doesn't help me.
I think figuring this out is the first step.